<html>
    <head>
        <meta charset="UTF-8" />
        <title></title>
        <!-- import Vue -->
        <script type="text/javascript" src="../js/vue.js"></script>
    </head>
    <body>
        <div id="root">
            {{msg}}
            <my-school></my-school>
        </div>
    </body>

    <script type="text/javascript">
        Vue.config.productionTip = false // 阻止vue在启动时生成生产提示。
        
        const s = Vue.extend({
            data(){
                return {
                    schoolName:'尚硅谷',
                    address:'北京'
                }
            },
            template:`
                <div>
                    <h2>学校名称：{{schoolName}}</h2>
                    <h2>学校地址：{{address}}</h2>
                </div>
            `,
        })

        new Vue({
            el:'#root',
            data:{
                msg: 'Hello World',
            },
            components:{
                'my-school': s
            }
        })
    </script>
</html>